package tw.com.softleader.json.jackson.app;

import java.io.InputStream;

import com.fasterxml.jackson.databind.ObjectMapper;

import tw.com.softleader.json.jackson.entity.Question02Entity;
import tw.com.softleader.json.jackson.entity.Question04Entity;

public class Question04App {

	public static void main(String[] args) {
		
		// Read file as InputStream..
		InputStream in = Question04App.class.getResourceAsStream("/question04.json");
		
		Question04Entity q04Entity = null;
		try {
			// TODO 請將 q04Entity 載入 question04.json 的資料, 
			// 請將 question04.json 增加 0911-111-111 與 0922-222-222 的兩支電話
			ObjectMapper objectMapper = new ObjectMapper();
			q04Entity = objectMapper.readValue(in, Question04Entity.class);

		} catch (Exception e) {
			e.printStackTrace();
		} 
		
		System.out.println(q04Entity);
		
	}
	
}
